import {request} from "@/utils/request.js"

export function getProfile(){
	return new Promise((resolve,reject)=>{
		request({
			url: '/system/user/profile',
			method:'GET',
		}).then((data)=>{
			resolve(data)
		})
	})
}

export function updatePwd(data){
	return new Promise((resolve,reject)=>{
		request({
			url: '/studentService/user/updatePwd',
			data,
			header:{
				'content-type':'application/x-www-form-urlencoded'
			},
			method:'PUT',
		}).then((data)=>{
			resolve(data)
		})
	})
}

export function updateProfile(data){
	return new Promise((resolve,reject)=>{
		request({
			url: '/studentService/user/updateProfile',
			data,
			method:'PUT',
		}).then((data)=>{
			resolve(data)
		})
	})
}